<template>
  <div>
    <h1>详情页面</h1>
    <p>当前商品Id: {{ $route.query.id }}</p>
  </div>
</template>

<script lang="ts" setup>
// 之前
// import { useRoute } from 'vue-router'

// nuxt
const route = useRoute();

console.log("route", route);
</script>
